package pers.lance.fsm;

import pers.lance.fsm.ssh.Client;

import java.util.Scanner;

public class Bash {
    Scanner scanner;
    Client client;

    public Bash(String host, int port){
        scanner = new Scanner(System.in);
        client = new Client(host, port);///asdsdadsdadasa
    }

    public void start(){
        if(client.connect()) {
            System.out.println("client connect.....");
            while (true) {
                String command = scanner.nextLine();
                System.out.println("input" + command);
                client.sendMessage(command);
//                System.out.println(client.getMessage());
            }
        }
    }

}
